#pragma once
#include <Rz/IObject.h>

namespace Rz { namespace IO {

class IStream :
	virtual public IObject
{
	public:
		RZ_RTTI_INTERFACE(Rz::IO, IStream);
		RZ_RTTI_IMPLEMENTS(IObject);
		RZ_RTTI_END;

		virtual size_t Read(byte_t* buffer, size_t size) const = 0;
		virtual void Write(const byte_t* buffer, size_t size) = 0;

		virtual byte_t ReadByte() const;
		virtual void WriteByte(byte_t byte);

		virtual void Seek(size_t position) = 0;
		virtual size_t GetPosition() const = 0;
		virtual size_t GetLength() const = 0;

		virtual bool IsOpened() const = 0;

		virtual bool CanSeek() const = 0;
		virtual bool CanRead() const = 0;
		virtual bool CanWrite() const = 0;

		virtual void Close() = 0;
};

} }
